/**
 * 1.是否数字判断
 * 2.NaN: 特殊的非数字
 * 3.整数判断
 * 4.类型转换
 * 5.整形Integer的最大值
 */
console.log('============>1.是否数字判断<============')
let a = 99.1;
console.log(Number.isFinite(a))
console.log(Number.isFinite('a123b')) // false
console.log(Number.isFinite('123')) // false
console.log('============>2.NaN: 特殊的非数字<============')
console.log(Number.isNaN(NaN));
console.log(Number.isNaN('123'));
console.log('============>3.整数判断<============')
let b = 3.14;
console.log(Number.isInteger(b))
console.log('============>4.类型转换<============')
let c = '9.81';
console.log(Number.parseFloat(c))
console.log(Number.parseInt('300'))
console.log('============>5.整形Integer的最大值<============')
console.log('传统最大: ', Math.pow(2, 53) - 1)
console.log('es6最大: ', Number.MAX_SAFE_INTEGER)
console.log('es6最小: ', Number.MIN_SAFE_INTEGER)
let n = Math.pow(2, 53);
console.log('es6安全判断: ', n);
console.log('es6是否安全整数: ', Number.isSafeInteger(n));